use serde::{Deserialize, Serialize};
use utoipa::ToSchema;

/// 菜单创建
#[derive(Debug, Serialize, Deserialize, ToSchema)]
pub struct MenuCreate {
    /// 名称
    pub name: String,
    /// 描述
    pub desc: Option<String>,
    /// 父级id
    pub parent_id: i32,
    /// 排序
    pub order: i32,
    /// 路径
    pub path: String,
    /// 图标
    pub icon: String,
}

/// 菜单更新
#[derive(Debug, Deserialize, Serialize, ToSchema)]
pub struct MenuUpdate {
    /// id
    pub id: i32,
    /// 名称
    pub name: String,
    /// 描述
    pub desc: Option<String>,
    /// 排序
    pub order: i32,
    /// 父级id
    pub parent_id: i32,
    /// 路径
    pub path: String,
    /// 图标
    pub icon: String,
}
